package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : [caohailong]
 * @version : [v1.0]
 * @Description : 菜品口味
 * @date : [2023/12/11 15:47]
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 批量添加口味信息
     * @param flavors 口味信息
     */
    void insertBatch(@Param("flavors") List<DishFlavor> flavors);

    /**
     * 删除口味信息
     * @param dishId 菜品id
     */
    @Delete("delete from dish_flavor where dish_id = #{dishId};")
    void deleteByDishId(@Param("dishId") Long dishId);
}
